function selectoption(id, value)
{
    var loca = document.getElementById(id).options ;
	for(var i=0;i<loca.length;i++){
		if(loca[i].value == value)
			loca[i].selected = true ;
	}
}
function changestatus(value,id)
{
    $("#loadstatus"+id).html('<image src="'+url+'templates/images/loading1.gif">');
    $.post(url+"order/changestatus",{'status':value,'id':id},function(data)
    {
        $("#loadstatus"+id).html('');  
                                                     
    },'json');    
}
function loadstatic()
{
    $("#static").html('<image src="'+url+'templates/images/loading.gif">');
    $.post(url+"ajax/thongke",{},function(data)
    {
        $("#static").html(data);                                               
    });     
}

//Site config
function loadConfig()
{
    $("#config").html('<image src="'+url+'templates/images/loading.gif">');
    $.post(url+"siteconfig/config",{},function(data)
    {
        $("#config").html(data);                                               
    });    
}

//Member
function updatemember(id){
    $("#page").html('<image src="'+url+'templates/images/loading.gif">');
    $.post(url+"member/update/",{'id':id},function(data)
    {
        $("#page").html(data);                                               
    });     
}

//Publish
function publish(table,field,id,status)
{
    $("#publish"+id).html('<image src="'+url+'templates/images/loading.gif">');
    $.post(url+"ajax/publish",{'table':table,'field':field,'id':id,'status':status},function(data)
    {
        $("#publish"+id).html(data);                                               
    });
}
$(function(){
    $("#title").keyup(function()
    {
        var word=$(this).val();
        $.post(url+"ajax/getalias/",{'name':word},function(data)
        {
            $("#alias").val(data);
        });
        return false;
    });
});
function trit(a){
	console.log(a) ;
}
